<?

Yii::app()->getClientScript()->registerCoreScript('jquery');

Yii::app()->getClientScript()->registerScriptFile('/js/jquery.toastmessage/toastmessage.js');
Yii::app()->getClientScript()->registerScriptFile('/js/utils.js');

$assets = Yii::app()->getAssetManager()->publish(dirname(__FILE__).'/assets');

?><!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <link rel="stylesheet" href="<?=$assets?>/css/bootstrap.css" type="text/css" media="screen, projection">
	<link rel="stylesheet" href="<?=$assets?>/css/style.css" type="text/css" media="screen, projection">
    
    <link rel="stylesheet" href="/js/jquery.toastmessage/toastmessage.css" type="text/css" media="screen, projection" />
    
    <title><?=CHtml::encode($this->pageTitle)?> #<?=Yii::app()->name?></title>
</head>

<script type="text/javascript">
$(function(){
    $('body').ajaxError(function(event, request, settings){
        $().toastmessage('showErrorToast', settings.type+' '+settings.url+'<br><br>'+request.responseText);
    });
});
</script>

<body>

<div class="topbar">
	<div class="fill">
        <div class="container">
            <a class="brand" href="/"><?=Yii::app()->name?></a>
          	<ul class="nav">
				<li class="active"><a href="/">Home</a></li>
				<li><a href="#about">About</a></li>
				<li><a href="#contact">Contact</a></li>
          	</ul>
          	<form action="" class="pull-right">
				<input class="input-small" type="text" placeholder="Username">
				<input class="input-small" type="password" placeholder="Password">
				<button class="btn" type="submit">Sign in</button>
          	</form>
        </div>
    </div>
</div>

<div class="container">

    <div class="content">
        <div class="page-header">
          	<h1><?=CHtml::encode($this->pageTitle)?></h1>
        </div>

		<?=$content?>

    </div>

    <footer>
        <p>Copyright &copy; <?=date('Y')?> by <a href="http://quetzal.ru/" target="_blank">Quetzal</a>.<br/>
        All Rights Reserved.<br/><?=Yii::powered()?></p>
    </footer>

</div> <!-- /container -->

</body>
</html>